<!--
 * @Date: 2023-04-11 09:26:53
 * @LastEditTime: 2023-08-28 13:00:08
 * @FilePath: /wkw/src/tabbar/home/components/problem.vue
 * 介绍:常见问题
-->
<script lang="ts" setup>
import { _require } from "@@/utils/tools";
import { ApiHomeData } from "@@/api/module/tabbarPage";
import { toArticlePage } from "@@/views/articlePage/mix";
const props = defineProps<{
  question: ApiHomeData.QuestionItem[];
}>();
</script>

<template>
  <Ccard>
    <div class="flex-J-SB flex-A-C">
      <h3>{{ $t("chang-jian-wen-ti") }}</h3>
      <div
        class="T-S-sm C-T3"
        @click.stop="$router.push({ name: 'me-aboutUs' })"
      >
        {{ $t("geng-duo") }}
        <VanIcon name="arrow" />
      </div>
    </div>
    <van-swipe autoplay="3000">
      <van-swipe-item
        @click="
          toArticlePage({
            ...item,
            pageTitle: 'chang-jian-wen-ti',
            createAt: item.updated_at,
          })
        "
        v-for="item in props.question"
      >
        <div class="problem T-A-C">
          <h3 class="T-omit" style="max-width: 100%">
            {{ item.title }}
          </h3>
          <div class="T-S-sm">{{ item.introduction }}</div>
        </div>
      </van-swipe-item>
    </van-swipe>
  </Ccard>
</template>

<style lang="scss" scoped>
.problem {
  padding: var(--gap-sm);
  margin-bottom: var(--gap-lg);
}
</style>
